package com.liu.spring.service;

import com.liu.spring.domain.User;
import com.liu.spring.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author LIU
 * @version 1.0
 * @description TODO
 * @date 2024/1/25 10:07
 */
@Component
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public void test(){
        List<User> users = userMapper.list();
        System.out.println(users);
        User user = userMapper.getUserById(1);
        System.out.println(user);
    }
}
